package com.uls.hj.service.impl;

import java.util.List;
import com.uls.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.uls.hj.mapper.HjMessagesMapper;
import com.uls.hj.domain.HjMessages;
import com.uls.hj.service.IHjMessagesService;

/**
 * 消息提醒Service业务层处理
 * 
 * @author hj
 * @date 2024-11-27
 */
@Service
public class HjMessagesServiceImpl implements IHjMessagesService 
{
    @Autowired
    private HjMessagesMapper hjMessagesMapper;

    /**
     * 查询消息提醒
     * 
     * @param messageId 消息提醒主键
     * @return 消息提醒
     */
    @Override
    public HjMessages selectHjMessagesByMessageId(Long messageId)
    {
        return hjMessagesMapper.selectHjMessagesByMessageId(messageId);
    }

    /**
     * 查询消息提醒列表
     * 
     * @param hjMessages 消息提醒
     * @return 消息提醒
     */
    @Override
    public List<HjMessages> selectHjMessagesList(HjMessages hjMessages)
    {
        return hjMessagesMapper.selectHjMessagesList(hjMessages);
    }

    /**
     * 新增消息提醒
     * 
     * @param hjMessages 消息提醒
     * @return 结果
     */
    @Override
    public int insertHjMessages(HjMessages hjMessages)
    {
        hjMessages.setCreateTime(DateUtils.getNowDate());
        return hjMessagesMapper.insertHjMessages(hjMessages);
    }

    /**
     * 修改消息提醒
     * 
     * @param hjMessages 消息提醒
     * @return 结果
     */
    @Override
    public int updateHjMessages(HjMessages hjMessages)
    {
        return hjMessagesMapper.updateHjMessages(hjMessages);
    }

    /**
     * 批量删除消息提醒
     * 
     * @param messageIds 需要删除的消息提醒主键
     * @return 结果
     */
    @Override
    public int deleteHjMessagesByMessageIds(Long[] messageIds)
    {
        return hjMessagesMapper.deleteHjMessagesByMessageIds(messageIds);
    }

    /**
     * 删除消息提醒信息
     * 
     * @param messageId 消息提醒主键
     * @return 结果
     */
    @Override
    public int deleteHjMessagesByMessageId(Long messageId)
    {
        return hjMessagesMapper.deleteHjMessagesByMessageId(messageId);
    }
}
